using System;
using System.Collections;
using Evaluant.Uss;
using Evaluant.Uss.DomainModel.ClassModel;
using Evaluant.Uss.Collections;	

namespace Evaluant.Uss.MappingGenerator
{

	[Serializable()]
	public class  ClassCollection : IList 
	{
		private ArrayList _list;

		public ClassCollection()
		{
			_list = new ArrayList();
		}
		
		public ClassCollection(ICollection value)
		{
			this.AddRange(value);
		}
		
		public object this[int index] 
		{
			get 
			{
				return ((Class)(_list[index]));
			}
			set 
			{
				_list[index] = value;
			}
		}
		
		public int Add(object item)
		{
			return _list.Add(item);
		}

		public void AddRange(IEnumerable value)
		{
			foreach(object item in value)
			{
				this.Add(item);
			}
		}
		
		public bool Contains(object value)
		{
			return _list.Contains(value);
		}
		
		public void CopyTo(System.Array array, int index)
		{
			_list.CopyTo(array, index);
		}
		
		public int IndexOf(object value)
		{
			return _list.IndexOf(value);
		}
		
		public void Clear()
		{
			_list.Clear();
		}

		public void Insert(int index,  object value)
		{
			_list.Insert(index, value);
		}
		
		public int Count
		{
			get { return _list.Count; }
		}

		public void RemoveAt(int index)
		{
			_list.RemoveAt(index);
		}

		public IEnumerator GetEnumerator()
		{
			return _list.GetEnumerator();
		}
		
		public void Remove(object item)
		{
			_list.Remove(item);
		}

		public bool IsSynchronized
		{
			get { return _list.IsSynchronized; }
		}

		public object SyncRoot
		{
			get { return _list.SyncRoot; }
		}

		public bool IsFixedSize
		{
			get { return _list.IsFixedSize; }
		}

		public bool IsReadOnly
		{
			get { return _list.IsReadOnly; }
		}

	}
}
